package com.example;

import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;

public class DaoGeneratorClass {
    public static void main(String[] args) throws Exception {
        Schema schema = new Schema(1, "com.tiffany.greendao");
        addNote(schema);
        new DaoGenerator().generateAll(schema, "./../GroupPro/app/src/main/java-gen");
    }

    /**
     * @param schema
     */
    private static void addNote(Schema schema) {
        Entity product = schema.addEntity("Product");
        product.addStringProperty("product_id").primaryKey();
        product.addStringProperty("name");
        product.addStringProperty("product_image");
        product.addStringProperty("store_price");
        product.addIntProperty("num");
    }
}
